/**   
* @Title: CRUDA.java 
* @Package com.action 
* @Description: TODO(用一句话描述该文件做什么) 
* @author 安天池   
* @date 2017年5月23日 下午3:57:40 
* JDK版本：1.8
* @version V1.0   
*/
package com.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @ClassName: CRUDA
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author 安天池
 * @date 2017年5月23日 下午3:57:40
 * 
 */
public class CRUDA extends ActionSupport {

	/** 
	* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
	*/
	private static final long serialVersionUID = 1L;

	public String add() {
		System.out.println("增加，HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH不 ");
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("str", "增加数据hellowordhellowordhellowordhellowordhellowordhellowordhellowordhellowordhellowordhelloword");
		ActionContext actionContext = ActionContext.getContext();
		actionContext.put("hello", "hellowordhellowordhellowordhellowordhellowordhellowordhellowordhellowordhellowordhelloword");
		return "success";
	}

	public String del() {
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("str", "删除数据");
		return "success";
	}

	public String update() {
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("str", "更新数据");
		return "success";
	}

	public String query() {
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("str", "查询数据");
		return "success";
	}

}
